<%@ page language="java" import="java.util.*, Data.Student"
	pageEncoding="UTF-8"%>

<html>
<head>

<title>图书信息管理系统</title>

</head>

<body>


	<h3 style="margin-top: 100px; text-align: center;">显示信息</h3>
	<table style="margin: 10px auto;">

		<%
			if (request.getAttribute("i") != null) {
		%>
		<tr>
			<td><%=request.getAttribute("i")%></td>
		</tr>
		<%
			}
		%>
		<%
			if (request.getAttribute("d") != null) {
		%>
		<tr>
			<td><%=request.getAttribute("d")%></td>
		</tr>
		<%
			}
		%>
		<%
			if (request.getAttribute("u") != null) {
		%>
		<tr>
			<td><%=request.getAttribute("u")%></td>
		</tr>
		<%
			}
		%>
		<%
			if (request.getAttribute("s1") != null) {
		%>
		<%
			if (request.getAttribute("s1").equals("查询失败")) {
		%>
		<tr>
			<td><%=request.getAttribute("s1")%></td>
		</tr>
		<%
			} else {
		%>

		<tr>
			<td style="width: 100px; font-size: 20px;text-align:center;">学号</td>
			<td style="width: 70px; font-size: 20px;text-align:center;">姓名</td>
			<td style="width: 50px; font-size: 20px;text-align:center;">性别</td>
			<td style="width: 50px; font-size: 20px;text-align:center;">年龄</td>
			<td style="width: 180px; font-size: 20px;text-align:center;">所属班级</td>
		</tr>
		<tr>
			<td style="text-align:center;"><%=request.getAttribute("s1")%></td>
			<td style="text-align:center;"><%=request.getAttribute("s2")%></td>
			<td style="text-align:center;"><%=request.getAttribute("s3")%></td>
			<td style="text-align:center;"><%=request.getAttribute("s4")%></td>
			<td style="text-align:center;"><%=request.getAttribute("s5")%></td>
		</tr>
		<%
			}
		%>
		<%
			}
		%>
		<%
			if (request.getAttribute("all") != null) {
				if (request.getAttribute("all").equals("查询失败")) {
		%>
		<%=request.getAttribute("all")%>
		<%
			} else {
					List<Student> list = new ArrayList<Student>();
					list = (List<Student>) request.getAttribute("all");
		%>
		<tr>
			<td style="width: 100px; font-size: 20px;text-align:center;">学号</td>
			<td style="width: 70px; font-size: 20px;text-align:center;">姓名</td>
			<td style="width: 50px; font-size: 20px;text-align:center;">性别</td>
			<td style="width: 50px; font-size: 20px;text-align:center;">年龄</td>
			<td style="width: 180px; font-size: 20px;text-align:center;">所属班级</td>
		</tr>
		<%
			for (Student item : list) {
		%>
		<tr>
			<td style="text-align:center;"><%=item.getId()%></td>
			<td style="text-align:center;"><%=item.getName()%></td>
			<td style="text-align:center;"><%=item.getSex()%></td>
			<td style="text-align:center;"><%=item.getAge()%></td>
			<td style="width: 180px;text-align:center;"><%=item.getClassname()%></td>
		</tr>
		<%
			}
				}
		%>
		<%
			}
		%>
	</table>
</body>
</html>
